<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset=UTF-8"">
<title>商品信息表</title>
<link rel="stylesheet" href="${contextPath}/static/statistics/css/bootstrap.min.css" />
<link rel="stylesheet" href="${contextPath}/static/bootstrap/css/bootstrap-table.css" />
<link rel="stylesheet" href="${contextPath}/static/ace/assets/css/ace.css" />
<link rel="stylesheet" href="${contextPath}/static/statistics/css/combo.select.css" />
<link rel="stylesheet" href="${contextPath}/static/bootstrap/css/bootstrap-select.css" />
<link rel="stylesheet" href="${contextPath}/static/statistics/css/bootstrap-datetimepicker.min.css" />
<link rel="stylesheet" href="${contextPath}/static/ztree/css/zTreeStyle.css" />
<script src="${contextPath}/static/statistics/js/jquery.js"></script>
<script src="${contextPath}/static/statistics/js/bootstrap.min.js"></script>
<script src="${contextPath}/static/bootstrap/js/bootstrap-table.js"></script>
<script src="${contextPath}/static/bootstrap/js/bootstrap-table-zh-CN.js"></script>
<script src="${contextPath}/static/statistics/js/jquery.combo.select.js"></script>
<script src="${contextPath}/static/bootstrap/js/bootstrap-select.min.js"></script>
<script src="${contextPath}/static/bootstrap/js/defaults-zh_CN.min.js"></script>
<script src="${contextPath}/static/statistics/js/bootstrap-datetimepicker.min.js"></script>
<script src="${contextPath}/static/statistics/js/bootstrap-datetimepicker.fr.js"></script>
<script src="${contextPath}/static/statistics/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${contextPath}/static/ztree/js/jquery.ztree.core-3.5.js"></script>
<script src="${contextPath}/static/ztree/js/jquery.ztree.excheck-3.5.js"></script>
<script src="${contextPath}/static/util/dateutils.js"></script>
<script src="${contextPath}/static/util/protutils.js"></script>
<style type="text/css">
	input.combo-input{
		padding:7px 4px; 
	}
	.panel{
		margin-bottom:0px;	
	}
	.panel-heading::after {
	    content: "";
	    display: block;
	    clear: both;
	}
	.caret{
		color:#ABBAC3;
	}
	.bootstrap-select > .btn{
		color:#ABBAC3 !important;
		background-color: #fff !important;
		text-shadow:none;
		border-width:1px;
	}
	.bootstrap-select > .btn:hover, .bootstrap-select > .btn:focus:hover, .bootstrap-select > .btn.focus:hover, .bootstrap-select > .btn:active:hover, .bootstrap-select > .btn:focus:active, .btn-default:focus:active, .open > .btn.dropdown-toggle, .open > .btn-default.dropdown-toggle, .open > .btn.dropdown-toggle:hover, .open > .btn-default.dropdown-toggle:hover, .open > .btn.dropdown-toggle:focus, .open > .btn-default.dropdown-toggle:focus, .open > .btn.dropdown-toggle.focus, .open > .btn-default.dropdown-toggle.focus, .open > .btn.dropdown-toggle:active, .open > .btn-default.dropdown-toggle:active {
	    background-color: #fff !important;
	    border-color: #ABBAC3;
	}
	.dropdown-header{
		cursor:pointer;
	}	
</style>
</head>
<body>
 <div class="panel panel-default">
  			<div class="panel-heading">
 				<h3 class="panel-title pull-left" style="text-shadow:2px 1px 2px #ABBAC3">商品信息表</h3>
 				<h5 class="pull-right" id="timeCount" style="margin-top: 0;margin-bottom: 0;"></h5>
 			</div>
            <div class="panel-body" style="padding-bottom:0">
                <form class="form-horizontal" class="form-inline" style="margin-bottom: 5px;"
				action="${contextPath}/ktcount/exportExcelProdInfo" method="post" id="exportExcel">
				 	<input id="sortName" name="sortName" type="hidden" value="s.SUPPLIER_NAME" />
					<input id="sortOrder" name="sortOrder" type="hidden" value="asc">
                    <div class="form-group">
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="productName" name="productName" placeholder="请输入商品名称">
                        </div>
                        
                        <div class="col-sm-2">
                        	<div class="input-group ">
                        		<input id="typeName" class="form-control" placeholder="选择商品类型" readonly/>
                        		<input id="typeId" name="prodType" type="hidden" />
                        		<input id="foreTypeName" name="foreTypeName" type="hidden" />
	                        	<span class="input-group-btn">
		                        	<div class="btn btn-primary btn-sm" onclick="javascript:$('#typeModal').modal('show');">
										选择
									</div>
	                        	</span>
                        	</div>
                        		                
						</div>
						<div class="col-sm-3">
                            <select class="selectpicker" multiple data-live-search="true" title="选择供应商名称" data-live-search-placeholder="搜索" data-actions-box="true" id="supplierName" >
							</select>
							<input type="hidden" name="supplierName" id="suppliername" />
                        </div>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="productCode" name="productCode" placeholder="条码">
                        </div>
                        <div class="col-sm-2">
                            <input type="text" class="form-control" id="helpCode" name="helpCode" placeholder="助记码">
                        </div>
             	
                    </div>
                    <div class="form-group">
                    	<div class="col-sm-2">
                            <select class="form-control" id="srtlPrice" name="srtlPrice" style="float:left;width:50%">
								<option value="=">=</option>
								<option value="<="><=</option>
								<option value=">=">>=</option>
							</select>
							<input type="text" class="form-control" id="rtlPrice" name="rtlPrice" placeholder="零售价" style="float:left;width:50%">
                        </div>
                    	
                        <div class="col-sm-2">
                             <select class="selectpicker" multiple data-live-search="true" title="选择商店名称" data-live-search-placeholder="搜素" data-actions-box="true" id="shopName">
								<optgroup label="直营" data-icon="glyphicon-ok">
									<c:forEach items="${shopnames}" var="shopname">
										<c:if test="${shopname.shopType=='直营'}">
											<option value="${shopname.shopId}">${shopname.shopName}</option>
										</c:if>
									</c:forEach>
								</optgroup>
								<optgroup label="加盟" data-icon="glyphicon-ok">
									<c:forEach items="${shopnames}" var="shopname">
										<c:if test="${shopname.shopType=='加盟'}">
											<option value="${shopname.shopId}">${shopname.shopName}</option>
										</c:if>
									</c:forEach>
								</optgroup>
							</select>
							<input type="hidden" name="shopName" id="shopname" />
							<input type="hidden" name="shopIdName" id="shopIdName" />
                        </div>
                        <div class="col-sm-2" style="text-align:left;float:right">
                            <button type="button" style="margin-left:50px;" id="btn_query" class="btn btn-sm btn-info">查询</button>
                        </div>
                    </div>
                    <input type="hidden" id="colsTitles" name="colsTitles" />
                    <input type="hidden" id="colsFields" name="colsFields" />
                </form>
            </div>
        </div>      
 <div id="toolbar" class="btn-group" style="margin-left:15px">
 			<button id="btn_refresh" type="button" class="btn btn-sm btn-warning">
                <span class="glyphicon glyphicon-refresh icon-refresh" aria-hidden="true"></span>刷新
            </button>
            <button onclick="exportExcel();" type="button" class="btn btn-sm btn-success">
                <span class="glyphicon glyphicon-file" aria-hidden="true"></span>导出
            </button>
            <button onclick="doPrint();" type="button" class="btn btn-sm btn-default">
                <span class="glyphicon glyphicon-print" aria-hidden="true"></span>打印
            </button>
            <button onclick="selectAll();" type="button" class="btn btn-sm btn-primary">
				全选
            </button>
            <button onclick="unSelectAll();" type="button" class="btn btn-sm btn-primary">
            	不选
            </button>
            <button type="button" class="btn btn-sm btn-success"
				onclick="javascript:window.history.go(-2);window.close();">
				<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span>返回</button>
        </div>         
       <!--startprint--> 
		<table id="kt_ProdInfo"></table>
		<!--endprint-->
				<div id="typeModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="typeModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
						&times;
					</button>
					<h4 class="modal-title" id="typeModalLabel">
						选择商品类型
					</h4>
				</div>
				<div class="modal-body">
					<ul id="typetree" class="ztree">
					</ul>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" onclick="javascript:selectedTypes()">
						确认
					</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">取消
					</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
		</div>
</body>
<script type="text/javascript">
$(function () {
	getProdType();
	timeCount();
	$('#shopName').selectpicker('selectAll');
	$(".dropdown-header").click(ddHeaderClick);
	$('#shopName').on('changed.bs.select',onSelectChange);
	$('#supplierName').on('changed.bs.select',onSupplierSelectChange);
    //1.初始化Table
});
function getProdType(){
	$.ajax({
        url: '${contextPath}/ktcount/getProdTypes', //localhost:8080
        type: 'post',
        success: function (data) {
            var orginTypes = data.data;
            var setting = {
                    check: {
                        enable: true,
                        chkStyle: "checkbox",
                    },
                    data: {
                        simpleData: {
                            enable: true,
                            idKey: "TYPE_ID",
                            pIdKey: "PARENT_ID",
                            rootPId: ''
                        },
                        key: {
                            name: "TYPE_NAME"
                        },
                    },
                };
                $.fn.zTree.init($("#typetree"), setting, orginTypes);
                selectedTypes();
                getSupplier();
                oTable.Init();
        },
        error: function (error) {
            alert(error)
        }
    })
}
function getSupplier(){
	$.ajax({
        url: '${contextPath}/ktcount/getSuppliers', //localhost:8080
        data:{"typeId":$("#typeId").val()},
        type: 'post',
        success: function (data) {
           	var data = data.data;
           	var html = "";
        	for(var i = 0;i < data.length;i++){
        		html +='<option value="'+data[i]["ID"]+'">'+data[i]["SUPPLIER_NAME"]+'</option>';
        	}

        	$("#supplierName").html(html);
        	$('#supplierName').selectpicker('refresh');
        	$("#suppliername").val("");
        },
        error: function (error) {
            alert(error)
        }
    })
}
var TableInit = function () {
    var oTableInit = new Object();
    //初始化Table
    oTableInit.Init = function () {
    	if($("#btn_query").hasClass("btn-default")){
			return;
		}
		$("#btn_query").removeClass("btn-info").addClass("btn-default");
        $('#kt_ProdInfo').bootstrapTable({
            url: '${contextPath}/ktcount/getktProdInfo',         //请求后台的URL（*）
            method: 'POST',                      //请求方式（*）
            toolbar: '#toolbar',                //工具按钮用哪个容器
            striped: true,                      //是否显示行间隔色
            cache: false,                       //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
            pagination: true,                   //是否显示分页（*）
            sortable: true,                     //是否启用排序
            sortName:"BRAND_NAME",
            sortOrder: "asc",                   //排序方式
            queryParams: oTableInit.queryParams,//传递参数（*）
            sidePagination: "server",           //分页方式：client客户端分页，server服务端分页（*）
            pageNumber:1,                       //初始化加载第一页，默认第一页
            pageSize: 10000,                       //每页的记录行数（*）
            pageList: [10, 50, 100,10000],        //可供选择的每页的行数（*）
            strictSearch: true,
            showColumns: true,                  //是否显示所有的列
            minimumCountColumns: 2,             //最少允许的列数
            clickToSelect: true,                //是否启用点击选中行
            height: 500,                        //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
            uniqueId: "ID",                     //每一行的唯一标识，一般为主键列
            showToggle:true,                    //是否显示详细视图和列表视图的切换按钮
            cardView: false,                    //是否显示详细视图
            detailView: false,                   //是否显示父子表
            columns: [{
                field: 'ROWNUM_',
                title: '序号'
            },{
                field: 'PRODUCT_CODE',
                title: '商品编码',
            	sortName:"p.PRODUCT_CODE",
            	sortable: true
            },{
                field: 'PRODUCT_NAME',
                title: '商品名称',
            	sortName:"p.PRODUCT_NAME",
            	sortable: true
            }, {
                field: 'SUPPLIER_NAME',
                title: '供应商',
            	sortName:"s.SUPPLIER_NAME",
            	sortable: true
            }, {
                field: 'TYPE_NAME',
                title: '品类名称',
            	sortName:"t.TYPE_NAME",
            	sortable: true
            }, {
                field: 'JJFS',
                title: '计价方式',
            	sortName:"JJFS",
            	sortable: true
            }, {
                field: 'TCL',
                title: '提成率',
            	sortName:"TCL",
            	sortable: true
            }, {
                field: 'TCJE',
                title: '提成金额(元)',
            	sortName:"TCJE",
            	sortable: true
            }, {
                field: 'UNIT',
                title: '单位',
            	sortName:"p.UNIT",
            	sortable: true
            }, {
                field: 'STOCK_SPEC',
                title: '进货规格',
            	sortName:"p.STOCK_SPEC",
            	sortable: true
            }, {
                field: 'SPEC',
                title: '规格',
            	sortName:"p.SPEC",
            	sortable: true
            }, {
                field: 'CST_PRICE',
                title: '进价(元)',
            	sortName:"CST_PRICE",
            	sortable: true
            }, {
                field: 'DISPATCH_PRICE',
                title: '批发价(元)',
            	sortName:"DISPATCH_PRICE",
            	sortable: true
            }, {
                field: 'DISPATCH_PCS_PRICE',
                title: '批条价(元)',
            	sortName:"DISPATCH_PCS_PRICE",
            	sortable: true
            }, {
                field: 'MIN_PRICE',
                title: '最低限价(元)',
            	sortName:"MIN_PRICE",
            	sortable: true
            }, {
                field: 'RTL_PRICE',
                title: '零售价(元)',
            	sortName:"RTL_PRICE",
            	sortable: true
            }, {
                field: 'VIP_PRICE',
                title: '会员价(元)',
            	sortName:"VIP_PRICE",
            	sortable: true
            }, {
                field: 'MLL',
                title: '毛利率%',
            	sortName:"MLL",
            	sortable: true
            }, {
                field: 'HELP_CODE',
                title: '助记码',
            	sortName:"p.HELP_CODE",
            	sortable: true
            }, {
                field: 'JXS',
                title: '进项税',
            	sortName:"JXS",
            	sortable: true
            }, {
                field: 'XXS',
                title: '销项税',
            	sortName:"XXS",
            	sortable: true
            }, {
                field: 'BONUS_POINTS_FLAG',
                title: '是否积分',
            	sortName:"p.BONUS_POINTS_FLAG",
            	sortable: true
            }, {
                field: 'JFZ',
                title: '积分值',
            	sortName:"JFZ",
            	sortable: true
            }, {
                field: 'WHKC',
                title: '维护库存',
            	sortName:"WHKC",
            	sortable: true
            }, {
                field: 'QTZS',
                title: '前台赠送',
            	sortName:"QTZS",
            	sortable: true
            }, {
                field: 'QTYJ',
                title: '前台议价',
            	sortName:"QTYJ",
            	sortable: true
            }, {
                field: 'QTDZ',
                title: '前台打折',
            	sortName:"QTDZ",
            	sortable: true
            }, {
                field: 'FDBJ',
                title: '分店变价',
            	sortName:"FDBJ",
            	sortable: true
            }, {
                field: 'PRODUCT_AREA',
                title: '产地'
            }, {
                field: 'DELIVER_PRICE',
                title: '配送价(元)',
            	sortName:"DELIVER_PRICE",
            	sortable: true
            }, {
                field: 'CREATE_TIME',
                title: '创建时间',
            	sortName:"p.CREATE_TIME",
            	sortable: true
            }, {
                field: 'CREATE_USER',
                title: '创建人',
            	sortName:"p.CREATE_USER",
            	sortable: true
            }, {
                field: 'MODIFY_TIME',
                title: '最后修改时间',
            	sortName:"p.MODIFY_TIME",
            	sortable: true
            }],
            contentType : "application/x-www-form-urlencoded",
            onLoadSuccess: function(data){
            	$("#btn_query").removeClass("btn-default").addClass("btn-info");
            }
        });
    };
    oTableInit.queryParams = function (params) {
    	var shopName = $("#shopName").val() == null ? "\'\'":$("#shopName").val().join(",");
    	var supplierName = $("#suppliername").val();
    	var prodType = $("#typeId").val();
    	var productName = $("#productName").val().trim();
    	var productCode = $("#productCode").val().trim();
    	var helpCode = $("#helpCode").val().trim();
    	var rtlPrice = $("#rtlPrice").val().trim();
    	$("#sortName").val(params.sort);
    	$("#sortOrder").val(params.order);
    	var filters = [];
    	prodType.trim() =="" ? null: filters.push({"fn":"t.TYPE_ID","ft":"in","fv":"("+prodType+")"});
    	shopName.trim() == "" ? null: filters.push({"fn":"ssp.SHOP_ID","ft":"in","fv":"("+shopName+")"});
    	supplierName == "" ? null: filters.push({"fn":"sp.SUPPLIER_ID","ft":"in","fv":"("+supplierName+")"});
    	helpCode == "" ? null: filters.push({"fn":"p.HELP_CODE","ft":"like","fv":"'%"+helpCode+"%'"});
    	productCode == "" ? null: filters.push({"fn":"p.PRODUCT_CODE","ft":"like","fv":"'%"+productCode+"%'"});
    	productName == "" ? null: filters.push({"fn":"p.PRODUCT_NAME","ft":"like","fv":"'%"+productName+"%'"});
    	rtlPrice == "" ? null : filters.push( {"fn":"p.RTL_PRICE","ft":$("#srtlPrice").val(),"fv":rtlPrice})
    	var temp = {   //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
            limit: params.limit,   //页面大小
            offset: params.offset,  //页码
            sortName:params.sort,
            orderName:params.order,
            filters:JSON.stringify(filters)
        };
        return temp;
    };
    return oTableInit;
}
$("#btn_refresh").bind('click',function(){
	if($("#btn_query").hasClass("btn-default")){
		return;
	}
	$("#btn_query").removeClass("btn-info").addClass("btn-default");
	$('#shopName').selectpicker('selectAll');
	$("#productName").val("");
	$("#helpCode").val("");
	$("#rtlPrice").val("");
	$('#kt_ProdInfo').bootstrapTable('refresh', { url: '${contextPath}/ktcount/getktProdInfo'});
})
var oTable = new TableInit();
$("#btn_query").bind("click",function(){
	if($("#btn_query").hasClass("btn-default")){
		return;
	}
	$("#btn_query").removeClass("btn-info").addClass("btn-default");
	$('#kt_ProdInfo').bootstrapTable('refresh', { url: '${contextPath}/ktcount/getktProdInfo'});
})
function onSupplierSelectChange(e){
	var supplierIds = $("#supplierName").val(),
	supplierId = "";
	if(supplierIds != null){
		for(var i=0;i<supplierIds.length;i++){
			supplierId +="\'"+supplierIds[i]+"\',"
		}
		supplierId = supplierId.substring(0,supplierId.length-1)
	}
	$("#suppliername").val(supplierId)
}
var exportExcel = function() {
	var shopName = $("#shopName").val() == null ? "\'\'":$("#shopName").val().join(",");
	$("#shopname").val(shopName);
	var shopIdName = $("[data-id='shopName']").attr("title");
	if(shopIdName.indexOf(",") == -1 && shopIdName!="选择商店名称"){
		$("#shopIdName").val(shopIdName);
	}
    var visibleCols = $('#kt_ProdInfo').bootstrapTable('getVisibleColumns');
    var fields = "",titles = "";
	for(var i = 0,visibleColsLen = visibleCols.length;i<visibleColsLen;i++){
		fields += visibleCols[i]["field"]+",";
		titles += visibleCols[i]["title"]+",";
	}
	$("#colsTitles").val(titles.substring(0,titles.length-1));
	$("#colsFields").val(fields.substring(0,fields.length-1));
	$("#exportExcel").submit();

}
function selectAll(){
	var hiddenCols = $('#kt_ProdInfo').bootstrapTable('getHiddenColumns');
	for(var i = 0,hiddenColsLen = hiddenCols.length;i<hiddenColsLen;i++){
		$('#kt_ProdInfo').bootstrapTable('showColumn', hiddenCols[i]["field"]);
	}
}
function unSelectAll(){
	var visibleCols = $('#kt_ProdInfo').bootstrapTable('getVisibleColumns');
	for(var i = 1,visibleColsLen = visibleCols.length;i<visibleColsLen;i++){
		$('#kt_ProdInfo').bootstrapTable('hideColumn', visibleCols[i]["field"]);
	}
}
function selectedTypes(){
	 $("#typeModal").modal('hide')
    var zTree = $.fn.zTree.getZTreeObj("typetree");
    var nodes = zTree.getCheckedNodes();
    var typeNameVal = "",typeIdVal = "",foreTypeNameVal = "";
    for(var i = 0,nodesLen = nodes.length;i < nodesLen;i++){
   	 if(!nodes[i]["isParent"]){
	    	 typeNameVal += nodes[i]["TYPE_NAME"]+",";
	    	 typeIdVal += nodes[i]["TYPE_ID"]+",";
   	 }
   	 if(nodes[i]["level"] == 0){
   		 foreTypeNameVal += nodes[i]["TYPE_NAME"]+",";
   	 }
    }
    if(nodes.length > 0){
   	 typeNameVal = typeNameVal.substring(0,typeNameVal.length-1);
   	 typeIdVal = typeIdVal.substring(0,typeIdVal.length-1);
   	 foreTypeNameVal = foreTypeNameVal.substring(0,foreTypeNameVal.length-1);
    }
    $("#typeName").val(typeNameVal);
    $("#typeId").val(typeIdVal);
    $("#foreTypeName").val(foreTypeNameVal);
    getSupplier();
}	
function ddHeaderClick(e){
	var $span = $(this).children("span:first-child");
	var idVal = $(this).parent().parent().next().attr("id");
	var allSelected = $("#"+idVal).val() || [];
	var index = $(this).attr("data-optgroup")-1;
	var $groupOption = $("#"+idVal).find('optgroup').eq(index).find("option");
	$groupOption.each(function(index,element){
		if($span.hasClass("glyphicon-ok")){
			allSelected.remove($(this).val());
		}else{
			allSelected.push($(this).val())
		}
	})
	if($span.hasClass("glyphicon-ok")){
		$span.removeClass("glyphicon-ok")
	}else{
		$span.addClass("glyphicon-ok")
	}
	$("#"+idVal).selectpicker('val',allSelected)
}
function onSelectChange(e){
	var idVal = $(this).attr("id");
	var $ddHeader = $("#"+idVal).prev().find(".dropdown-header");
	var $optgroup = $(this).find("optgroup");
	$optgroup.each(function(index,element){
		var optionLen = $(this).find('option:selected').length;
		var $span = $ddHeader.eq(index).children("span:first-child");
		if(optionLen > 0){
			if(!$span.hasClass("glyphicon-ok")){
				$span.addClass("glyphicon-ok")
			}
		}else{
			if($span.hasClass("glyphicon-ok")){
				$span.removeClass("glyphicon-ok")
			}
		}
	})
}
function doPrint() {
    bdhtml=window.document.body.innerHTML;
    sprnstr="<!--startprint-->";
    eprnstr="<!--endprint-->";
    prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
    prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
    window.document.body.innerHTML=prnhtml;
    window.print();
    window.location.reload(); //刷新当前页面
}
function timeCount(){
	var oDateUtil = new DateUtil();
	setInterval(function(){
		var date = new Date();
		var formatDate = oDateUtil.formatDate(date,"yyyy-MM-dd hh:mm:ss",true);
		$("#timeCount").html(formatDate)
	},1000)
}
</script>
</html>